<?php
require_once('lib/dbclass.php');
$db = new MySQL();


if (! $db->Query("SELECT * FROM berita INNER JOIN kategori
ON berita.id_kategori=kategori.id_kategori order by id_berita desc limit 2;")) $db->Kill(); 
	
?>	

 <!-- Our CSS stylesheet file -->
<link rel="stylesheet" href="assets/css/styles.css" />
<!-- Google Fonts -->
<link href='http://fonts.googleapis.com/css?family=Roboto:400,900italic,700italic,900,700,500italic,500,400italic,300italic,300,100italic,100|Open+Sans:400,300,400italic,300italic,600,600italic,700italic,700,800|Source+Sans+Pro:400,200,200italic,300,300italic,400italic,600,600italic,700' rel='stylesheet' type='text/css'>


<!-- Styles -->
<link href="css2/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css" />
<link href="css2/style.css" rel="stylesheet" type="text/css" />
<link href="css2/responsive.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="layerslider/css/layerslider.css" type="text/css">
<link rel="stylesheet" type="text/css" href="css/sea-green.css" title="sea-green" />

<!-- Scripts For Layer Slider  -->
<script src="layerslider/JQuery/jquery-easing-1.3.js" type="text/javascript"></script>
<script src="layerslider/JQuery/jquery-easing-1.3.js" type="text/javascript"></script>
<script src="layerslider/js/layerslider.transitions.js" type="text/javascript"></script>
<script src="layerslider/js/layerslider.kreaturamedia.jquery.js" type="text/javascript"></script>
<!-- Document Ready Functions -->

				
					
					<div class="sidebar-widget">
					<div class="sidebar-title">
						<h4>Berita <span>Terbaru</span></h4>
					</div>
					<?php while($rs = $db->RowArray()):?>
					<div class="popular-post">
						<img src="admin/images/berita/<?php echo $rs ['gambar']; ?>" width="270"  height="103" alt="" />
						<div class="popular-post-title">
							<h6><a href="index.php?q=11&id=<?php echo $rs['id_berita'] ?>" title=""><?php echo $rs['judul']; ?></a></h6>
							<span><?php echo $rs['tanggal']; ?></span>
						</div>
					<?php endwhile;?>
					</div>
					</div>
					
					